/*文章评论相关请求模块*/
import request from "@/utils/request";
//获取文章评论
export const getComment=params=>{
  return request({
      method:'get',
      url:'/v1_0/comments',
      params
  })
}

//评论点赞
export const addLike=commentId=>{
  return request({
      method:'POST',
      url:'/v1_0/comment/likings',
      data:{
        target:commentId
      }
  })
}

//取消评论点赞
export const delLike=commentId=>{
  return request({
      method:'DELETE',
      url:`/v1_0/comment/likings/${commentId}`,
  })
}


//添加评论或评论回复
export const addComment=data=>{
  return request({
      method:'POST',
      url:'/v1_0/comments',
      data
  })
}
